﻿@model IEnumerable<PhotoBlogApp.Core.User>
<div class="block">
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Login)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Email)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsAdmin)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Password)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.IsModerator)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Login)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Email)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.IsAdmin)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Password)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.IsModerator)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.UserId }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.UserId })
                </td>
            </tr>
        }
    </table>
    @Html.ActionLink("На главную", "Index", "Root")
</div>
